<?php
/**
 * Installer common include file
 *
 * @copyright		The XOOPS project http://www.xoops.org/
 * @license			http://www.fsf.org/copyleft/gpl.html GNU General Public License (GPL)
 * @package			installer
 * @since			2.0.18
 * @version			$Id: common.inc.php 604 2006-07-01 22:28:37Z skalpa $
 *
 * @author			Haruki Setoyama  <haruki@planewave.org>
 * @author			Kazumi Ono <webmaster@myweb.ne.jp>
 * @author			Skalpa Keo <skalpa@xoops.org>
 * @author			dugris <dugris@frxoops.org>
**/

/**
 * If non-empty, only this user can access this installer
 */
define( 'INSTALL_USER', '' );
define( 'INSTALL_PASSWORD', '' );

define("XOOPS_ROOT_PATH", str_replace( "\\", "/", realpath( '../' ) ) );
define('XOOPS_INSTALL', 1);

// Instantiate  error handler / logger class
global $xoopsLogger, $xoopsErrorHandler;
include_once '../class/logger.php';
$xoopsLogger =& XoopsLogger::instance();
$xoopsErrorHandler =& $xoopsLogger;
$xoopsLogger->startTime();
$xoopsLogger->startTime( 'XOOPS Boot' );
error_reporting( E_ALL );

// options for mainfile.php
$xoopsOption['nocommon'] = true;
@include_once '../mainfile.php';

include_once '../include/version.php';
include_once './include/functions.php';
include_once './class/installwizard.php';

if ( ini_get( 'magic_quotes_gpc' ) ) {
	@array_walk( $_GET, 'stripslashes' );
	@array_walk( $_POST, 'stripslashes' );
	@array_walk( $_REQUEST, 'stripslashes' );
}


$pageHasHelp = false;
$pageHasForm = false;

session_start();

$wizard =& new XoopsInstallWizard();
if ( !$wizard->xoInit() ) {
	die('XOOPS Custom Installation die');
}

if ( !@is_array( $_SESSION['settings'] ) ) {
	$_SESSION['settings'] = array();
}

?>